chore(deps): standardize monorepo on react 19.x for next.js 16 compatibility#28722
chore(deps): standardize monorepo on react 19.x for next.js 16 compatibility#28722TanmayChaurasia24 wants to merge 4 commits intocalcom:mainfrom
Conversation
📝 WalkthroughWalkthroughThis pull request upgrades the monorepo's React version from 18.x to 19.2.4 across configuration files. React and react-dom dependencies are updated to 19.2.4, and TypeScript type definitions are updated to version 19. The root package.json adds explicit resolutions for React packages to standardize versions across the monorepo. CONTRIBUTING.md is updated to document React 19 as the standard for contributors to use. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
package.json (1)
124-125: Use an exact@types/react-domresolution for consistency with the rest of the type packages.
@types/react-domis set to^19.0.0while@types/reactis pinned to19.0.0. For consistency and to avoid unexpected version variations when regenerating lock files, pin this to an exact version.Suggested diff
- "@types/react-dom": "^19.0.0", + "@types/react-dom": "19.0.0",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 124 - 125, Change the package.json dependency for "@types/react-dom" from a caret range to an exact pinned version to match "@types/react" (i.e., replace "@types/react-dom": "^19.0.0" with an exact "19.0.0"); update the package.json entry for the "@types/react-dom" dependency so the version specifier is identical to the "@types/react" entry to prevent inadvertent semver upgrades.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/package.json`:
- Around line 123-125: Update the `@testing-library/react` dependency in
package.json from the pinned "13.3.0" to a version that supports React 19 (for
example change "@testing-library/react" to "^16.3.0" or a later compatible
release); update the lockfile (npm/yarn/pnpm) and run install to ensure the new
version is resolved and tests still pass, and verify no other test-related deps
require simultaneous upgrades.
---
Nitpick comments:
In `@package.json`:
- Around line 124-125: Change the package.json dependency for "@types/react-dom"
from a caret range to an exact pinned version to match "@types/react" (i.e.,
replace "@types/react-dom": "^19.0.0" with an exact "19.0.0"); update the
package.json entry for the "@types/react-dom" dependency so the version
specifier is identical to the "@types/react" entry to prevent inadvertent semver
upgrades.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 75145016-26a7-469c-8f10-d7e0a5dc5021
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
CONTRIBUTING.mdapps/web/package.jsonpackage.json
| "react": "19.2.4", | ||
| "react-digit-input": "2.1.0", | ||
| "react-dom": "18.2.0", | ||
| "react-dom": "19.2.4", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What are the peerDependencies for @testing-library/react@13.3.0, and which @testing-library/react versions officially support React 19?
💡 Result:
Web search failed: Server error: no LLM provider could handle the message
🏁 Script executed:
#!/bin/bash
# Query npm registry for `@testing-library/react` versions and peerDependencies
npm view `@testing-library/react`@13.3.0 peerDependencies --json 2>/dev/null || echo "npm not available, trying alternative"Repository: calcom/cal.com
Length of output: 108
🌐 Web query:
@testing-library/react 13.3.0 React 19 compatibility
💡 Result:
Web search failed: Server error: no LLM provider could handle the message
🏁 Script executed:
#!/bin/bash
# Check recent `@testing-library/react` versions and their React peer dependencies
npm view `@testing-library/react` versions --json 2>/dev/null | tail -20 && echo "---" && npm view `@testing-library/react`@16.0.1 peerDependencies --json 2>/dev/nullRepository: calcom/cal.com
Length of output: 440
🏁 Script executed:
#!/bin/bash
# Check the latest `@testing-library/react` version (16.3.2)
npm view `@testing-library/react`@16.3.2 peerDependencies --json 2>/dev/nullRepository: calcom/cal.com
Length of output: 251
🏁 Script executed:
#!/bin/bash
# Check version 16.3.0 peer dependencies
npm view `@testing-library/react`@16.3.0 peerDependencies --json 2>/dev/nullRepository: calcom/cal.com
Length of output: 251
Update @testing-library/react to a version supporting React 19.
Line 161 pins @testing-library/react to 13.3.0, which requires React ^18.0.0 and is incompatible with the React 19 upgrade at Lines 123 and 125. Upgrade to version 16.3.0 or later, which explicitly supports both React 18 and React 19.
Suggested fix
- "@testing-library/react": "13.3.0",
+ "@testing-library/react": "16.3.2",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/web/package.json` around lines 123 - 125, Update the
`@testing-library/react` dependency in package.json from the pinned "13.3.0" to a
version that supports React 19 (for example change "@testing-library/react" to
"^16.3.0" or a later compatible release); update the lockfile (npm/yarn/pnpm)
and run install to ensure the new version is resolved and tests still pass, and
verify no other test-related deps require simultaneous upgrades.
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
Summary
This PR fully standardizes the monorepo's dependency tree onto React 19 (specifically
19.2.4and@types/react@19.0.0).We are adopting React 19 universally because Next.js 16 no longer supports React 18. This resolves the fragmented
reactandreact-domversioning across root resolutions and app workspaces, which was at risk of causing serious hydration mismatches and inconsistentrefforwarding behavior.Changes:
reactandreact-domto19.2.4insideapps/web/package.jsonand in top-level definitions.@types/reactand@types/react-domto19.0.0in root resolutions.React 19standard inCONTRIBUTING.mdto prevent future version drift.Type of change
Checklist
feat(scope): descriptionorchore(deps): descriptionyarn type-check:ci --force)Fixes #28634
